package com.xiweicheng.test.springboot.mutil.ds.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xiweicheng.test.springboot.mutil.ds.model.User;
import com.xiweicheng.test.springboot.mutil.ds.service.UserService;

@RequestMapping("user")
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @PostMapping("add")
    public int addUser(@RequestBody User user) {

        return userService.addUser(user);
    }

}
